package com.qfmy.model.entity.community;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import nonapi.io.github.classgraph.json.Id;

import java.time.LocalDateTime;

/**
 * @author 清风明月
 * @Package com.qfmy.model.entity
 * @date 2025/4/13
 * @description 博客分类实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuppressWarnings("all")
public class BlogClass {
    @Schema(description = "分类id")
    @Id
    private Integer id;

    @Schema(description = "分类的名称")
    @Size(max = 50)
    @NotBlank
    private String title;

    @Schema(description = "分类的图片")
    @NotBlank
    private String image;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "content")
    @Size(max = 255)
    @NotBlank
    private String content;

    @Schema(description = "观看次数")
    private Integer readCount;
}